<template>
  <div class="privacyPolicy">
      <div class="privacyPolicynav">
        <img style="margin-left:12px" @click="toindex" src="../../assets/images/fanhui.png" alt="">
        <div>隐私政策</div>
        <div style="margin-right:12px;width:18px;height:19px;"></div>
      </div>
      <div class="privacyPolicy_box" style="margin-top:49px">
        <div v-html="userAgreement"></div>
      </div>
  </div>
</template>

<script>
export default {
    data:() => ({
        userAgreement:'',
        code:''
    }),
    created(){
        this.getInfoByCode(),
        console.log(this.$route.params.code)
        this.code = this.$route.params.code
    },
    methods:{
        toindex() {
            this.$router.push({ 
                name:'index',
                query: {
                    code: this.code
                }
            });
        },

        getInfoByCode(){
            this.$http.getInfoByCode({code:'user_agreement'}).then(res=>{
                console.log(res)
                this.userAgreement = res.data.info.content
            })
            console.log(this.userAgreement)
        },
    }
}
</script>

<style>
@import 'index';
</style>